{extend name="property/public/insidePageBase" /}
{block name="title"}编加财务流水{/block}
{block name="body"}
<div class="layuimini-container">
    <div class="layuimini-main" id="app">
        <div class="layui-form layui-form-pane">
            <div class="layui-row">
                <div class="layui-col-xs6">
                    <div class="layui-form-item"> <label class="layui-form-label">流水编号</label>
                        <div class="layui-input-block">
                            <input type="text" value="{$info['finance_no']??''}" disabled autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">收支类型</label>
                        <div class="layui-input-block">
                            <select name="finance_type" disabled>
                                <option value="">直接选择或搜索选择</option>
                                <option value="1"{:isset($info['finance_type']) ? $info['finance_type'] == 1 ? 'selected' : '' : ''}>收入</option>
                                <option value="2"{:isset($info['finance_type']) ? $info['finance_type'] == 2 ? 'selected' : '' : ''}>支出</option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">费用类别</label>
                <div class="layui-input-block">
                    <input type="text" name="cate_id" id="cate-data" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-xs6">
                    <div class="layui-form-item"> <label class="layui-form-label">开始时间</label>
                        <div class="layui-input-block">
                            <input type="text" name="start_date" value="{$info['start_date']??''}"  placeholder="开始时间" class="layui-input  laydate-type-day">
                        </div>
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">结束时间</label>
                        <div class="layui-input-block">
                            <input type="text" name="end_date"  value="{$info['end_date']??''}" placeholder="结束时间" class="layui-input  laydate-type-day">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-xs6">
                    <div class="layui-form-item"> <label class="layui-form-label">支付方式</label>
                        <div class="layui-input-block">
                            <select name="pay_method" lay-verify="required" lay-search>
                                <option value="">-请选择-</option>
                                {foreach $payMethodData as $k=>$v}
                                <option value="{$k}"  {:isset($info['pay_method']) ? $info['pay_method'] == $k ? 'selected' : '' : ''}>{$v}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">支付金额</label>
                        <div class="layui-input-block">
                            <input type="text" name="amount" value="{$info['amount']??''}" placeholder="支付金额" class="layui-input">
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">备注说明</label>
                <div class="layui-input-block">
                    <textarea placeholder="请输入备注说明" class="layui-textarea" name="remark">{$info['remark']??''}</textarea>
                </div>
            </div>
            <div class="layui-form-item layui-hide">
                <button type="button" class="layui-btn layui-btn-primary replaceUploadImg toggleUpload" lay-data="{}"></button>
                <button class="layui-btn" lay-submit lay-filter="submitBtn" id="submitBtn">提交</button>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
{__block__}
<script>
    layui.use(['form', 'laydate', 'layer', 'layCascader'], function () {
        var form = layui.form,layer = layui.layer,  $ = layui.$, laydate = layui.laydate,layCascader = layui.layCascader;
        laydate.render({
            elem: '.laydate-type-day'
            ,format: 'yyyy-MM-dd'
        });
        layCascader({
            elem: '#cate-data',
            clearable: true,
            disabled: true,
            value: {$info['cate_id'] ?? 0},
            options: {:json_encode($cateNameData,JSON_UNESCAPED_UNICODE)}
        });
    });
</script>
{/block}